package chapter05

/**
 *
 * @author cdhuangchao3
 * @date 2023/6/9 5:04 PM
 */
object Test13_Lazy {
  def main(args: Array[String]): Unit = {
    lazy val result: Int = sum(13, 47)
    println("1.函数调用")
    println(s"2.result = ${result}")
    println(s"4.result = ${result}")
  }

  def sum(a:Int, b:Int):Int = {
    println("3.sum调研")
    a+b
  }
}
